#include <afxwin.h>
#include "EXBaseResSet.h"
#include "EXButtonResSet.h"
#include "EXDateTimeCtrlResSet.h"
#include "EXDropdownComboBoxResSet.h"
#include "EXDropListComboBoxResSet.h"
#include "EXEditResSet.h"
#include "EXHeaderCtrlResSet.h"
#include "EXIPAddressCtrlResSet.h"
#include "EXListCtrlResSet.h"
#include "EXListCtrlWndResSet.h"
#include "EXProgressCtrlResSet.h"
#include "EXScrollBarResSet.h"
#include "EXSliderCtrlResSet.h"
#include "EXSpinButtonCtrlResSet.h"
#include "EXStaticResSet.h"
#include "EXDialogResSet.h"
#include "EXMsgBoxResSet.h"


//RESSET    Naming = RESSET_ CTRLNAME _ COLORNAME _ (NO)IMAGE _ RESOLUTIONSIZE
#define RESSET                                              10100000

#define RESSET_PUSHBTN_DARK_IMAGE_NORMAL					          RESSET + 1
#define RESSET_PUSHBTN_BRIGHTNESS_NOIMAGE_SMALL			        RESSET_PUSHBTN_DARK_IMAGE_NORMAL + 1

#define RESSET_CHECKBTN_DARK_IMAGE_NORMAL					          RESSET_PUSHBTN_BRIGHTNESS_NOIMAGE_SMALL + 1
#define RESSET_CHECKBTN_DARK_NOIMAGE_NORMAL					        RESSET_CHECKBTN_DARK_IMAGE_NORMAL + 1

#define RESSET_RADIOBTN_DARK_IMAGE_NORMAL					          RESSET_CHECKBTN_DARK_NOIMAGE_NORMAL + 1
#define RESSET_RADIOBTN_DARK_NOIMAGE_NORMAL					        RESSET_RADIOBTN_DARK_IMAGE_NORMAL + 1

#define RESSET_EDIT_DARK_IMAGE_NORMAL				                RESSET_RADIOBTN_DARK_NOIMAGE_NORMAL + 1
#define RESSET_EDIT_BRIGHTNESS_NOIMAGE_SMALL				        RESSET_EDIT_DARK_IMAGE_NORMAL + 1
#define RESSET_EDIT_BRIGHTNESS_SPIN_NORMAL                  RESSET_EDIT_BRIGHTNESS_NOIMAGE_SMALL + 1
#define RESSET_EDIT_DARK_COMBOBG_NORMAL                     RESSET_EDIT_BRIGHTNESS_SPIN_NORMAL + 1

#define RESSET_DATETIME_DARK_IMAGE_NORMAL				          	RESSET_EDIT_DARK_COMBOBG_NORMAL + 1
#define RESSET_DATETIME_BRIGHTNESS_NOIMAGE_NORMAL	      	  RESSET_DATETIME_DARK_IMAGE_NORMAL + 1

#define RESSET_DOWNCOMBO_DARK_IMAGE_NORMAL				    	    RESSET_DATETIME_BRIGHTNESS_NOIMAGE_NORMAL + 1
#define RESSET_DOWNCOMBO_BRIGHTNESS_IMAGE_LARGE	    	      RESSET_DOWNCOMBO_DARK_IMAGE_NORMAL + 1

#define RESSET_LISTCOMBO_DARK_IMAGE_NORMAL				    	    RESSET_DOWNCOMBO_BRIGHTNESS_IMAGE_LARGE + 1
#define RESSET_LISTCOMBO_BRIGHTNESS_IMAGE_SMALL	    	      RESSET_LISTCOMBO_DARK_IMAGE_NORMAL + 1

#define RESSET_HEADERCTRL_DARK_IMAGE_NORMAL				          RESSET_LISTCOMBO_BRIGHTNESS_IMAGE_SMALL + 1
#define RESSET_HEADERCTRL_BRIGHTNESS_NOIMAGE_SMALL	  	    RESSET_HEADERCTRL_DARK_IMAGE_NORMAL + 1

#define RESSET_IPADDRESS_DARK_IMAGE_NORMAL					        RESSET_HEADERCTRL_BRIGHTNESS_NOIMAGE_SMALL + 1
#define RESSET_IPADDRESS_BRIGHTNESS_NOIMAGE_NORMAL			  	RESSET_IPADDRESS_DARK_IMAGE_NORMAL + 1

#define RESSET_LISTCTRL_DARK_IMAGE_NORMAL				        	  RESSET_IPADDRESS_BRIGHTNESS_NOIMAGE_NORMAL + 1
#define RESSET_LISTCTRL_BRIGHTNESS_NOIMAGE_LARGE				    RESSET_LISTCTRL_DARK_IMAGE_NORMAL + 1

#define RESSET_LISTCTRLWND_DARK_IMAGE_NORMAL				      	RESSET_LISTCTRL_BRIGHTNESS_NOIMAGE_LARGE + 1
#define RESSET_LISTCTRLWND_BRIGHTNESS_NOIMAGE_NORMAL		   	RESSET_LISTCTRLWND_DARK_IMAGE_NORMAL + 1

#define RESSET_PROGRESSCTRL_DARK_NOIMAGE_NORMAL				    	RESSET_LISTCTRLWND_BRIGHTNESS_NOIMAGE_NORMAL + 1
#define RESSET_PROGRESSCTRL_DARK_IMAGE_NORMAL		          	RESSET_PROGRESSCTRL_DARK_NOIMAGE_NORMAL + 1

#define RESSET_HSCROLLBAR_IMAGE_NORMAL				  	          RESSET_PROGRESSCTRL_DARK_IMAGE_NORMAL + 1
#define RESSET_VSCROLLBAR_IMAGE_LARGE				                RESSET_HSCROLLBAR_IMAGE_NORMAL + 1

#define RESSET_SLIDERCTRL_DARK_IMAGE_NORMAL				        	RESSET_VSCROLLBAR_IMAGE_LARGE + 1
#define RESSET_SLIDERCTRL_BRIGHTNESS_NOIMAGE_NORMAL		    	RESSET_SLIDERCTRL_DARK_IMAGE_NORMAL + 1

#define RESSET_SPINCTRL_DARK_IMAGE_NORMAL				            RESSET_SLIDERCTRL_BRIGHTNESS_NOIMAGE_NORMAL + 1
#define RESSET_SPINCTRL_DARK_NOIMAGE_LARGE					        RESSET_SPINCTRL_DARK_IMAGE_NORMAL + 1

#define RESSET_STATIC_DARK_IMAGE_NORMAL				      	      RESSET_SPINCTRL_DARK_NOIMAGE_LARGE + 1
#define RESSET_STATIC_BRIGHTNESS_NOIMAGE_NORMAL		          RESSET_STATIC_DARK_IMAGE_NORMAL + 1
#define RESSET_STATIC_DARK_NOIMAGE_SMALL_DIALOG             RESSET_STATIC_BRIGHTNESS_NOIMAGE_NORMAL + 1

#define RESSET_SCROLLBAR_DARK_NOIMAGE_NORMAL				        RESSET_STATIC_DARK_NOIMAGE_SMALL_DIALOG + 1

#define RESSET_DIALOG_DARK_IMAGE_SMALL				              RESSET_SCROLLBAR_DARK_NOIMAGE_NORMAL + 1
#define RESSET_DIALOG_DARK_NOIMAGE_SMALL				            RESSET_DIALOG_DARK_IMAGE_SMALL + 1

#define RESSET_MSGBOX_DARK_IMAGE_SMALL				              RESSET_DIALOG_DARK_NOIMAGE_SMALL + 1
#define RESSET_MSGBOX_DARK_NOIMAGE_SMALL				            RESSET_MSGBOX_DARK_IMAGE_SMALL + 1


//Image     Naming = IMG _ CTRLNAME _ SUBSECTION
#define IMG                                                 11000000

#define IMG_PUSHBTN_BG                      		    	      IMG + 1
#define IMG_CHECKBTN_CHECK                    		        	IMG_PUSHBTN_BG + 1
#define IMG_CHECKBTN_UNCHECK                 			          IMG_CHECKBTN_CHECK + 1
#define IMG_RADIOBTN_CLICK                   			          IMG_CHECKBTN_UNCHECK + 1
#define IMG_RADIOBTN_UNCLICK                  			        IMG_RADIOBTN_CLICK + 1

#define IMG_STATIC_BG                                       IMG_RADIOBTN_UNCLICK + 1

#define IMG_EDIT_BG                                         IMG_STATIC_BG + 1
#define IMG_EDIT_SPIN_BG                                    IMG_EDIT_BG + 1

#define IMG_HEADER_BG                                       IMG_EDIT_SPIN_BG + 1

#define IMG_HSCROLL_LEFT                                    IMG_HEADER_BG + 1
#define IMG_HSCROLL_RIGHT                                   IMG_HSCROLL_LEFT + 1
#define IMG_HSCROLL_BG                                      IMG_HSCROLL_RIGHT + 1
#define IMG_HSCROLL_THUMB                                   IMG_HSCROLL_BG + 1
#define IMG_HSCROLL_THUMB_BG                                IMG_HSCROLL_THUMB + 1
#define IMG_HSCROLL_THUMB_ARROW                             IMG_HSCROLL_THUMB_BG + 1

#define IMG_VSCROLL_LEFT                                    IMG_HSCROLL_THUMB_ARROW + 1
#define IMG_VSCROLL_RIGHT                                   IMG_VSCROLL_LEFT + 1
#define IMG_VSCROLL_BG                                      IMG_VSCROLL_RIGHT + 1
#define IMG_VSCROLL_THUMB                                   IMG_VSCROLL_BG + 1
#define IMG_VSCROLL_THUMB_BG                                IMG_VSCROLL_THUMB + 1
#define IMG_VSCROLL_THUMB_ARROW                             IMG_VSCROLL_THUMB_BG + 1

#define IMG_PROGRESS_BG                                     IMG_VSCROLL_THUMB_ARROW + 1
#define IMG_PROGRESS_BAR                                    IMG_PROGRESS_BG + 1

#define IMG_SLIDER_CHANNEL_H                                IMG_PROGRESS_BAR + 1
#define IMG_SLIDER_THUMB_H                                  IMG_SLIDER_CHANNEL_H + 1

#define IMG_SPIN_VERT_BG                                    IMG_SLIDER_THUMB_H + 1
#define IMG_SPIN_VERT_DOWN                                  IMG_SPIN_VERT_BG + 1
#define IMG_SPIN_VERT_UP                                    IMG_SPIN_VERT_DOWN + 1

#define IMG_COMBO_BTN                                       IMG_SPIN_VERT_UP + 1
#define IMG_COMBO_BG                                        IMG_COMBO_BTN + 1

#define IMG_TEXTBOX_BG                                      IMG_COMBO_BG + 1
#define IMG_IP_TEXTBOX_BG                                   IMG_TEXTBOX_BG + 1
#define IMG_EDIT_COMBO_BG                                   IMG_IP_TEXTBOX_BG + 1

#define IMG_DIALOG_TOP                                      IMG_EDIT_COMBO_BG + 1
#define IMG_DIALOG_BOTTOM                                   IMG_DIALOG_TOP + 1
#define IMG_DIALOG_LEFT                                     IMG_DIALOG_BOTTOM + 1
#define IMG_DIALOG_RIGHT                                    IMG_DIALOG_LEFT + 1
#define IMG_DIALOG_LEFT_TOP                                 IMG_DIALOG_RIGHT + 1
#define IMG_DIALOG_LEFT_BOTTOM                              IMG_DIALOG_LEFT_TOP + 1
#define IMG_DIALOG_RIGHT_TOP                                IMG_DIALOG_LEFT_BOTTOM + 1
#define IMG_DIALOG_RIGHT_BOTTOM                             IMG_DIALOG_RIGHT_TOP + 1

#define IMG_MSGBOX_BG                                       IMG_DIALOG_RIGHT_BOTTOM + 1

//ColorSet    Naming = COLORSET _ COLORNAME _ SUBSECTION
#define COLORSET                                            10010000

#define COLORSET_DARK                				                COLORSET + 1
#define COLORSET_BASIC                				              COLORSET_DARK + 1
#define COLORSET_BRIGHTNESS                			            COLORSET_BASIC + 1

//Font        Naming = FONT _ COLORNAME _ RESOLUTIONSIZE _ SUBSECTION
#define FONT                                                10001000

#define FONT_DARK_SMALL				                    	        FONT + 1
#define FONT_BASIC_SMALL				                            FONT_DARK_SMALL + 1
#define FONT_BRIGHTNESS_SMALL			              	          FONT_BASIC_SMALL + 1

#define	FONT_DARK_NORMAL			                              FONT_BRIGHTNESS_SMALL + 1
#define	FONT_BASIC_NORMAL			                              FONT_DARK_NORMAL + 1
#define	FONT_BRIGHTNESS_NORMAL		              	          FONT_BASIC_NORMAL + 1

#define	FONT_DARK_LARGE			                                FONT_BRIGHTNESS_NORMAL + 1
#define	FONT_BASIC_LARGE			                  	          FONT_DARK_LARGE + 1
#define	FONT_BRIGHTNESS_LARGE			              	          FONT_BASIC_LARGE + 1

//Color       Naming = COLOR _ COLORNAME _ SUBSECTION
#define COLOR                                               10000100

#define COLOR_DARK                				                  COLOR + 1
#define COLOR_BASIC                				                  COLOR_DARK + 1
#define COLOR_BRIGHTNESS                			              COLOR_BASIC + 1
#define COLOR_MAGENTA                			                  COLOR_BRIGHTNESS + 1

#define COLOR_DARK_DIALOG          				                  COLOR_MAGENTA + 1


//Resource ID
#define IDB_BITMAP1                                   10000
#define IDB_BITMAP5                                   10001
#define IDB_SLIDER_CHANNEL_H                          10002
#define IDB_SLIDER_THUMB_H                            10003
#define IDB_COMBO_BG                                  10004
#define IDB_COMBO_BTN                                 10005
#define IDB_COMBO_EDIT                                10006

#define IDB_HEADER_BG_S                               10015
#define IDB_SPIN_VERT_UP                              10016
#define IDB_SPIN_VERT_BG                              10017
#define IDB_SPIN_VERT_DOWN                            10018
#define IDB_SPIN_VERT_BG_DOWN                         10019
#define IDB_SPIN_VERT_BG_UP                           10020
#define IDB_SPIN_TEXTBOX                              10021
#define IDB_SPIN_BG                                   10022
#define IDB_BTN_CHECKBOX                              10023
#define IDB_BTN_UNCHECKBOX                            10024
#define IDB_BTN_CHECKRADIO                            10025
#define IDB_BTN_UNCHECKRADIO                          10026
#define IDB_TEXTBOX_B                                 10027
#define IDB_STATIC_BG                                 10028
#define IDB_SPIN_VERT                                 10029
#define IDB_LISTCTRL_EXTRA_S                          10030
#define IDB_HSCROLL_LEFT                              10031
#define IDB_HSCROLL_RIGHT                             10032
#define IDB_HSCROLL_BG_S                              10033
#define IDB_HSCROLL_THUMB                             10034
#define IDB_HSCROLL_BG                                10035
#define IDB_HSCROLL_THUMB_ARROW                       10036
#define IDB_VSCROLL_UP                                10037
#define IDB_VSCROLL_DOWN                              10038
#define IDB_VSCROLL_BG_S                              10039
#define IDB_VSCROLL_THUMB                             10040
#define IDB_VSCROLL_BG                                10041
#define IDB_VSCROLL_THUMB_ARROW                       10042
#define IDB_HEADER_BG_SS                              10043
#define IDB_PG_PROGRESS                               10044
#define IDB_COMBO_ARROW                               10045
#define IDB_TEXTBOX_D                                 10046
#define IDB_IP_TEXTBOX_B                              10047

#define IDB_DLG_LEFT_TOP                              10048
#define IDB_DLG_RIGHT                                 10049
#define IDB_DLG_RIGHT_BOTTOM                          10050
#define IDB_DLG_RIGHT_TOP                             10051
#define IDB_DLG_TOP                                   10052
#define IDB_DLG_BOTTOM                                10053
#define IDB_DLG_LEFT                                  10054
#define IDB_DLG_LEFT_BOTTOM                           10055

#define IDB_DLG_BUTTON                                10056


enum RESOURCE_TYPE
{
  NOIMAGE = 0,
  PUSH_BUTTON = 10,
  CHECK_BUTTON,
  RADIO_BUTTON,
  STATIC_CTRL,
  EDIT_CTRL,
  HEADER_CTRL,
  SCROLLBAR_CTRL,
  PROGRESS_CTRL,
  SLIDER_CTRL,
  SPIN_CTRL,
  DROPDOWN_COMBO_CTRL = 20,
  LISTDOWN_COMBO_CTRL,
  IPADDRESS_CTRL,
  DATETIME_CTRL,
  DIALOG_CTRL,
  MSGBOX_CTRL,
};

enum RESOLUTIONSIZE
{
  SMALL,
  NORMAL,
  LARGE,
};

struct RESOURCE_SET
{
  UINT m_nId;
  CEXBaseResSet* m_pResSet;

  RESOURCE_SET()
  {
    m_nId = 0;
    m_pResSet = NULL;
  }

  ~RESOURCE_SET() { if(m_pResSet != NULL) 
                delete m_pResSet; }

};

struct RESOURCE_IMAGE
{
  UINT		m_nID;
  UINT  m_nImgId;
  int   m_nImgCnt;
  
  RESOURCE_IMAGE()	
  { 	
    m_nID		= 0;
    m_nImgCnt = 0;
    m_nImgId = 0;
  }
};

struct RESOURCE_COLORSET
{
  UINT		m_nID;
  COLORREF	m_crStateColor[4];

  RESOURCE_COLORSET()	
  { 	
    m_nID		= 0;
    for(int ncnt=0; ncnt < _countof(m_crStateColor); ncnt++)
      m_crStateColor[ncnt]	= 0;
  }
};

struct RESOURCE_COLOR
{
  UINT		m_nID;
  COLORREF	m_crBkColor;

  RESOURCE_COLOR()	
  { 	
    m_nID		= 0;
    m_crBkColor	= 0;
  }
};

struct RESOURCE_FONT
{
  UINT		m_nID;
  CFont		m_Font;
  COLORREF m_crText;

  RESOURCE_FONT()		
  { 
    m_nID		= 0;
    m_crText = 0;
  }
};